<?php
class Router{

    private static array $getRouters = [];
    private static array $postRouters = [];


    public function getGetRouter():array{
        return self::$getRouters;
    }
    public function getPostRouter():array{
        return self::$postRouters;
    }

    /**
     * /** 拦截所有
     * /index/* 拦截index下的所有方法
     * @param string $path
     * @param string $method
     * @return void
     */
    public static function get(string $path, string $method){
        self::$getRouters[$path] = $method;
    }

    public static function post(string $path, string $method){
        self::$postRouters[$path] = $method;
    }

}
